<?php
    //debug($json_data);
?>
<table class="table table_addr">
    <tr>
        <td><strong>Date Received</strong>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $json_data['SaleCreditPayment']['pay_date'];?></td>
        <td><strong>Payment Amount</strong>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $json_data['SaleCreditPayment']['paid_amount_currency'].' '. number_format($json_data['SaleCreditPayment']['original_paid_amount'], 2, '.', ',');?></td>
    </tr>
    <tr>
        <td><strong>Payment Method</strong>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $json_data['SaleCreditPayment']['pay_type'];?></td>
        <td><strong>Outstanding Balance </strong>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $json_data['Sale']['currency'].' '. number_format($outstanding_balance, 2, '.', ',');?></td>
    </tr>
    <tr>
        <td><strong>Check/Ref. No.</strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td><strong>Sale ID</strong>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $json_data['Sale']['invoice_number'];?></td>
    </tr>
</table>

<div><strong>Invoices Paid</strong></div>

<table class="table">
    <thead>
        <tr>
            <th>Date</th>
            <th>Number</th>
            <th>Amount Applied</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><?php echo $json_data['Sale']['purchased_date'];?></td>
            <td><?php echo $json_data['Sale']['invoice_number'];?></td>
            <td><?php echo $json_data['Sale']['deposit_currency'].'  -'. number_format($json_data['Sale']['original_deposit_amt'], 2, '.', ',');?></td>
        </tr>
    </tbody>
</table>

